﻿<%@ Page ValidateRequest="false" Language="C#" MasterPageFile="~/MasterPage/MasterPage.Master" AutoEventWireup="true" CodeBehind="BGM_SourceType.aspx.cs" Inherits="KPIS.GERP.GBMS.APP_UI.BGM_SourceType" %>
<%@ Register src="../Controls/Panel/CommandPanel.ascx" tagname="CommandPanel" tagprefix="uc4" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
	
	<Link rel="StyleSheet" href="../../Styles/StyleSheet.css" type="text/css" />

	<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" BackgroundPosition="None" ></telerik:RadAjaxLoadingPanel>

	<telerik:RadAjaxManager runat="server" ID="RadManager1" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
		<AjaxSettings>
			<telerik:AjaxSetting AjaxControlID="CmdCtrl">
				<UpdatedControls>
					<telerik:AjaxUpdatedControl ControlID="PanelGrid" LoadingPanelID="RadAjaxLoadingPanel1"/>
					<telerik:AjaxUpdatedControl ControlID="PanelList" LoadingPanelID="RadAjaxLoadingPanel1"/>                    
				</UpdatedControls>
			</telerik:AjaxSetting>
			<telerik:AjaxSetting AjaxControlID="Grid">
				<UpdatedControls>
					<telerik:AjaxUpdatedControl ControlID="PanelGrid" LoadingPanelID="RadAjaxLoadingPanel1"/>
					<telerik:AjaxUpdatedControl ControlID="PanelList" LoadingPanelID="RadAjaxLoadingPanel1"/>
					<telerik:AjaxUpdatedControl ControlID="CmdCtrl" LoadingPanelID="RadAjaxLoadingPanel1"/>                                               
				</UpdatedControls>
			</telerik:AjaxSetting>
		</AjaxSettings>
	</telerik:RadAjaxManager>

	<asp:Label ID="hdSeq" runat="server" ></asp:Label>

	<div class="defaultFont" >
		
		<table style="width: 980px; height: 100%;">
			<tr> 
				<td style="vertical-align: text-top; padding-left: 5px">
				
					<div class="BackgroundSlim"> 
							<uc4:CommandPanel ID="CmdCtrl" runat="server" SetBackGroundTransparentcy="True" />
					</div>
				</td> 
			</tr>
			<tr>
				<td style="vertical-align: text-top; padding-left: 5px">
				
					<div class="Background980V2">
						<div>
							<div class="header-grid" style="margin-bottom: 5px">
								<div class="defaultFont">
									ตารางแสดงข้อมูลทะเบียนประเภทแหล่งเงิน</div>
							</div> 

							<asp:Panel ID="panelList" runat="server" ScrollBars="Auto" Visible="false" >
								<ul id="SourceTypeInfo" class="formList">
									<li>
										<table>
											<tr>
												<td width="150px">
													รหัส :
												</td>
												<td>
													<asp:Label ID="lbCode" runat="server" AssociatedControlID="txtCode"></asp:Label>
													<asp:TextBox ID="txtCode" runat="server" Visible="false" Width="150px" 
														MaxLength="10"></asp:TextBox>
													<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
														ControlToValidate="txtCode" ErrorMessage="*" SetFocusOnError="True" 
														ValidationGroup="1"></asp:RequiredFieldValidator>
												</td>
												<td> 
													&nbsp;
												</td>
											</tr>
										</table>
									</li>
									<li><table><tr><td width="150px">ชื่อประเภทของเงิน :</td><td><asp:Label ID="lbName" runat="server" AssociatedControlID="txtName"></asp:Label>
										<asp:TextBox ID="txtName" runat="server" Text="" Visible="false" Width="400px" 
											ValidationGroup="1" MaxLength="100"></asp:TextBox>
										<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
											ControlToValidate="txtName" ErrorMessage="*" SetFocusOnError="True" 
											ValidationGroup="1"></asp:RequiredFieldValidator>
										</td></tr></table>
									</li>
									<li><table width="80%"><tr><td valign="top" width="150px">คำอธิบาย :</td><td><asp:Label ID="lbDescr" runat="server" AssociatedControlID="txtDescr"></asp:Label>
										<asp:TextBox ID="txtDescr" runat="server" Height="120"  Text="" TextMode="MultiLine" Visible="false" Width="100%"></asp:TextBox></td></tr></table>
									</li>
									<li class="lastListItem">
									</li>
								</ul>
							</asp:Panel>
							

							<asp:Panel ID="panelGrid" runat="server" ScrollBars="Auto" Visible="True" >
							
								<telerik:RadGrid GroupingSettings-CaseSensitive="false" ID="Grid" 
									runat="server" AllowFilteringByColumn="True" 
									AllowMultiRowSelection="True" AllowPaging="True" AllowSorting="True" 
									AutoGenerateColumns="False" EnableAJAX="True" OnItemCommand="Grid_ItemCommand"
									GridLines="None" CellSpacing="0">
								
									<MasterTableView AllowMultiColumnSorting="true" DataKeyNames="Sequence" ClientDataKeyNames="Sequence"
										Width="100%">
										<EditFormSettings>
											<EditColumn FilterControlAltText="Filter EditCommandColumn column">
											</EditColumn>
										</EditFormSettings>
										<PagerStyle Mode="NextPrevNumericAndAdvanced" />
										<CommandItemSettings ExportToPdfText="Export to PDF" />
										<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" 
											Visible="True">
										</RowIndicatorColumn>
										<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" 
											Visible="True">
										</ExpandCollapseColumn>
										<Columns>
											<telerik:GridClientSelectColumn HeaderStyle-HorizontalAlign="Center" 
												ItemStyle-HorizontalAlign="Center" ItemStyle-Width="30px" 
												UniqueName="ClientSelectColumn">
												<HeaderStyle HorizontalAlign="Center" Width="32px" />
												<ItemStyle HorizontalAlign="Center" Width="30px" />
											</telerik:GridClientSelectColumn>
											<telerik:GridBoundColumn AutoPostBackOnFilter="true" 
												CurrentFilterFunction="Contains" DataField="Code" FilterControlWidth="100%" 
												HeaderStyle-HorizontalAlign="Center" HeaderText="รหัส" 
												ItemStyle-HorizontalAlign="Left" ItemStyle-Width="100px" ShowFilterIcon="false" 
												UniqueName="Code">
												<HeaderStyle HorizontalAlign="Center" Width="100px" />
												<ItemStyle HorizontalAlign="Center" Width="60px" />
											</telerik:GridBoundColumn>
											<telerik:GridTemplateColumn AutoPostBackOnFilter="true" 
												CurrentFilterFunction="Contains" DataField="Name" FilterControlWidth="100%" 
												HeaderStyle-HorizontalAlign="Center" ShowFilterIcon="false" Visible="false">
												<ItemTemplate>
													<asp:Label ID="targetSequence" runat="server" Text='<%# Eval("Sequence") %>'></asp:Label>
												</ItemTemplate>
												<HeaderStyle HorizontalAlign="Center" />
											</telerik:GridTemplateColumn>
											<telerik:GridTemplateColumn AutoPostBackOnFilter="true" 
												CurrentFilterFunction="Contains" DataField="Name" FilterControlWidth="100%" 
												HeaderStyle-HorizontalAlign="Center" HeaderText="ชื่อประเภทของเงิน" 
												ItemStyle-Width="200px" ShowFilterIcon="false" UniqueName="Name">
												<ItemTemplate>
													<asp:LinkButton ID="targetControl" runat="server" CommandName="TargetClick" 
														Text='<%# Eval("Name") %>'></asp:LinkButton>
												</ItemTemplate>
												<HeaderStyle HorizontalAlign="Center" />
												<ItemStyle Width="220px" />
											</telerik:GridTemplateColumn>
											<telerik:GridBoundColumn AutoPostBackOnFilter="true" 
												CurrentFilterFunction="Contains" DataField="Description" 
												FilterControlWidth="100%" HeaderStyle-HorizontalAlign="Center" 
												HeaderText="คำอธิบาย" ShowFilterIcon="false" UniqueName="Description">
												<HeaderStyle HorizontalAlign="Center" />
											</telerik:GridBoundColumn>
										</Columns>
									</MasterTableView>

									<GroupingSettings CaseSensitive="False" />

									<ClientSettings EnableRowHoverStyle="true" >
										<Selecting AllowRowSelect="True" />
										<ClientEvents  />
										<Resizing AllowColumnResize="True" />
									</ClientSettings>

									<FilterMenu EnableImageSprites="False">
									</FilterMenu>

								</telerik:RadGrid>

							</asp:Panel>
						 </div>
					</div>

				</td>
			</tr> 
		</table>    
		 
	</div>

</asp:Content>